package com.xxx.mall.api.admin;

import com.xxx.mall.dto.PageQuery;
import com.xxx.mall.response.R;
import com.xxx.mall.service.BrandService;
import com.xxx.mall.vo.BrandVO;
import com.xxx.mall.vo.PageVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * <p>
 * 品牌信息 前端控制器
 * </p>
 *
 * @author 邢晨旭
 * @since 2023-11-15
 */
@RestController("shopBrandController")
@RequestMapping("/admin/brand")
public class BrandApi {

    @Resource
    BrandService brandService;

    @GetMapping("/page")
    public R<PageVO<BrandVO>> page(@Valid PageQuery pageQuery, Long categoryId) {
        return R.ok(brandService.pageList(pageQuery, categoryId));
    }


}
